//
//  PageSwitchEnum.swift
//  SimpleCal
//
//  Created by 杜晓祥 on 2021/10/28.
//

import Foundation

enum PageSwitchEnum: Int {
    case DAY = 0
    case MONTH = 1
    case YEAR = 2
    case MANY_YEAR = 3
}
extension PageSwitchEnum {
    func next() -> PageSwitchEnum? {
        return PageSwitchEnum(rawValue: self.rawValue + 1)
    }
    func pre() -> PageSwitchEnum? {
        return PageSwitchEnum(rawValue: self.rawValue - 1)
    }
}
